package sz.com.postoffice.jxyzwgcase.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import sz.com.postoffice.jxyzwgcase.core.TableDataInfo;
import sz.com.postoffice.jxyzwgcase.dao.master.TGridDao;
import sz.com.postoffice.jxyzwgcase.pojo.TGrid;
import sz.com.postoffice.jxyzwgcase.service.OrgService;

/**
 * @ClassName UserServiceImpl
 * @Deacription TODO
 * @Author 王盟
 * @Date 2020/10/23 15:38
 * @Version 1.0
 **/

@Service
public class OrgServiceImpl implements OrgService {
	@Autowired
    private TGridDao tGridDao;
	
	@Override
	public TableDataInfo getOrgList(TGrid tGrid) {
		List<TGrid> tGridList =  tGridDao.findByListEntity(tGrid);
	    TableDataInfo tableDataInfo = new TableDataInfo(tGridList, tGridList.size());
	    tableDataInfo.setCode(200);
	    tableDataInfo.setMsg("请求成功");
	    return tableDataInfo;
	}

	@Override
	public TableDataInfo getTGridList(TGrid tGrid) {
		List<TGrid> tGridList =  tGridDao.getTGridList(tGrid);
	    TableDataInfo tableDataInfo = new TableDataInfo(tGridList, tGridList.size());
	    tableDataInfo.setCode(200);
	    tableDataInfo.setMsg("请求成功");
	    return tableDataInfo;
	}
}
